class: center, middle, inverse, title-slide # Review R ### Psych 10 C ### University of California, Irvine ### 04/04/2022 --- ## Review of R - In this class we will review some of the basic elements in R. -- - R is a programing lenguaje -- - One of its main advantages is that users are able to write code and functions and make them available for other users. -- - These functions come in the form of packages which we can download using RStudio. --- class: inverse, center, middle # Scripts and R Markdown --- ## R scripts - R scripts are use to write and store code, for example, if we want to analize the data od an experimenta, we can write a script that does multiple operations and stores new data with what we want to show. -- - We use them to make sure that we can replicate a data analysis, or to save the code we used to generate a plot. --- ## R Markdown - R Markdown files `.rmd` are different from simple R scripts. -- - It allows us to integrate text and R code in a single file. -- - Whever we "knit" this type of file, the integrated R code is executed and the variables are saved momentarily. -- - Notice that the variables are not saved in R as when "running" an R script, but they are saved in memory while the file is beign created, which means that we can use them inside the document. -- - This is really usefull when we have graphs or outcomes of a data analysis that we want to integrate into a report. --- class: inverse, center, middle # RSudio --- ## RStudio - RStudio is a graphical interface for R. It makes it easier to interact with R by maintaining the console, scripts and graphs all in the same place. - From this point on, we will work simultaneously with RStudi and the lecture notes as you should do when working on your homeworks.